import dearpygui.dearpygui as dpg

dpg.create_context()
# 优势 1.自动将容器推送到容器堆栈。2.自动将容器弹出容器堆栈。3.更结构化、更具可读性的代码。
with dpg.window(label="Tutorial"):
    with dpg.menu_bar():
        with dpg.menu(label="Themes"):
            dpg.add_menu_item(label="Dark")
            dpg.add_menu_item(label="Light")
            dpg.add_menu_item(label="Classic")

dpg.create_viewport(title='Custom Title', width=800, height=600)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()